package cn.itcast.hotel.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhangchengzheng
 * @date 2024/6/24 16:30
 * @change 2024/6/24 16:30 by zhangchengzheng for init
 */
@Configuration
public class EsConfig {
    @Bean
    public RestHighLevelClient client(){
        return new RestHighLevelClient(RestClient.builder(
                HttpHost.create("http://192.168.227.128:9200")
        ));
    }
}
